import { changeTabelToolsModel } from '@/components/table_tools/index'
import {deepCopy} from '@/utils/tools'
import {store} from '@/store/index'

function iconType(){
    
    const iconType = {
        close: 'icon-stop',
        open: 'icon-opensystem'
    };

    
    const tableModel = store.state.carTableStore.toolsModel
    return iconType[tableModel]
}
 
const auditingTableModelChange = deepCopy(changeTabelToolsModel);

auditingTableModelChange.fn = (type?:string) =>{
    store.commit('auditingStore/setToolsModel', type)
    this.icon = iconType()
}

export default auditingTableModelChange